package Mike.collections;

import java.util.*;
import java.io.*;

import Mike.Parser.StringParser;

public class printHashTable {
	public static void print_HashTable(Hashtable htable){
		Enumeration e=htable.keys();
		while(e.hasMoreElements()){
			Object key = e.nextElement();
			System.out.println(key.toString()+" : "+htable.get(key));
		}
	}
	public static void print_HashTable(Hashtable htable,String whitespace,String whitespace2,PrintWriter out,Boolean encode){
		Enumeration e=htable.keys();
		while(e.hasMoreElements()){
			Object key = e.nextElement();
			if(key.toString()!=null&&!key.toString().equals("")){
				//System.out.println((int)key.toString().charAt(0));
			}
			if(encode==true){
				out.println(whitespace+StringParser.fromStringServlet(key.toString())+" : "+StringParser.fromStringServlet(htable.get(key).toString())+whitespace2);
			}else{
				out.println(whitespace+key.toString()+" : "+htable.get(key).toString()+whitespace2);
			}
		}
	}
}
